<template>
  <div id="Home">
    <TopNav></TopNav>
    <Carousel></Carousel>
    <div class="main">
      <div class="left">
        <ArticleCard></ArticleCard>
      </div>
      <div class="right">
        <ArticleRecommend></ArticleRecommend>
      </div>
    </div>
    <Footer></Footer>
    <div class="writeArticle" @click="$router.push('/WangEditor')">写文章</div>
  </div>
</template>

<script>
import TopNav from '../components/common/TopNav.vue'
import Footer from '../components/common/Footer.vue'
import Carousel from '../components/home/Carousel.vue'
import ArticleCard from '../components/home/ArticleCard'
import ArticleRecommend from '../components/home/ArticleRecommend .vue'

export default {
  name: "Home",
  components: {
    TopNav,
    Footer,
    Carousel,
    ArticleCard,
    ArticleRecommend
  }
}
</script>

<style scoped>
#Home {
  padding: 1px;
}

.main {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  height: 1000px;
  z-index: 1;
  position: relative;
}

.left {
  width: 50vw;
}

.right {
  width: 20vw;
}

.writeArticle {
  position: fixed;
  z-index: 100;
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  bottom: 100px;
  right: 100px;
  background-color: #BDBDBD;
  opacity: .8;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.writeArticle:hover {
  transform: scale(1.05);
}
</style>